@php
    /** @var \App\Model\Cms $article */
@endphp
@extends('home.app')

@section('title', 'Eocmart')

@section('content')
    <div class="container page">
    {!! $article->content !!}
    <!--发送表单成功后显示-->
        @if ($article->category === 'contact_us')
            @if ($success === true)
                <div class="alert alert-success" role="alert">Message sent successfully.</div>
            @endif

        <!--发送表单-->
            <form action="" id="contact_form" class="contact-form" accept-charset="UTF-8" method="post">
                @csrf
                <div class="form-group">
                    <label for="ContactFormName">Name</label>
                    <input id="ContactFormName" class="form-control" type="text" name="name" value="">
                </div>
                <div class="form-group">
                    <label for="ContactFormEmail" class="">Email</label>
                    <input id="ContactFormEmail" class="form-control" type="email" name="email" autocorrect="off"
                           autocapitalize="off" value="">
                </div>
                <div class="form-group">
                    <label for="ContactFormPhone">Phone Number</label>
                    <input id="ContactFormPhone" class="form-control" type="tel" name="phone" pattern="[0-9\-]*"
                           value="">
                </div>
                <div class="form-group">
                    <label for="ContactFormMessage">Message</label>
                    <textarea id="ContactFormMessage" class="form-control" rows="10" name="message"></textarea>
                </div>
                <input type="submit" class="btn btn-primary custom custom-padding text-uppercase" value="Send">
            </form>
            </div>
        @endif
@endsection
